find transpose of a matrix